package com.xinzhidi.web.equipment.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


/**
 * 设备AddDto对象 equipment
 *
 * @author ruoyi
 * @date 2023-05-29
 */
@ApiModel(value = "设备对象")
@Data
@EqualsAndHashCode(callSuper = false)
public class EquipmentAddDto {
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "dtuId")
    private Long dtuId;

    @ApiModelProperty(value = "设备级别（0：小区  1：楼栋  2：单元  3：住户）")
    @NotNull(message = "设备级别不能为空")
    private String equipmentLevel;

    @ApiModelProperty(value = "协议类型 1：户用阀门协议 2：单元阀门协议 3：室温采集器协议 4：户用热量表协议 5：单元热量表协议")
//    @NotBlank(message = "协议类型不能为空")
    private String protocolType;

    @ApiModelProperty(value = "小区id")
    @NotNull(message = "小区id不能为空")
    private Long lotId;

    @ApiModelProperty(value = "楼栋id")
    @NotNull(message = "楼栋id不能为空")
    private Long buildId;

    @ApiModelProperty(value = "单元id")
    private Long unitId;

    @ApiModelProperty(value = "住户id")
    private Long householdId;

    @ApiModelProperty(value = "设备名称")
    @NotBlank(message = "设备名称不能为空")
    @Size(max = 100, message = "设备名称长度不能大于100")
    private String equipmentName;

    @ApiModelProperty(value = "设备编号")
    @NotBlank(message = "设备编号不能为空")
    @Size(max = 100, message = "设备编号长度不能大于100")
    private String equipmentCode;

    @ApiModelProperty(value = "设备类型")
    @NotBlank(message = "设备类型不能为空")
    @Size(max = 100, message = "设备类型长度不能大于100")
    private String equipmentType;

    @ApiModelProperty(value = "设备分组id")
    @NotNull(message = "设备分组id不能为空")
    @Min(value = 0, message = "设备分组id不能比0小")
    private Long equipmentGroupId;

    @ApiModelProperty(value = "详细位置")
    @NotBlank(message = "详细位置不能为空")
    @Size(max = 100, message = "详细位置长度不能大于100")
    private String address;

    @ApiModelProperty(value = "是否主动抄表（1：是  2：否）")
    @NotBlank(message = "主动抄表不能为空")
    @Size(max = 100, message = "主动抄表长度不能大于100")
    private String autoRead;

    @ApiModelProperty(value = "备注")
    private String remark;
}
